package kr.hkit.javaproject.chapter00;

import java.util.Scanner;

public class Loop2_1 {
	public static void main(String[] args) {
		Scanner input = new Scanner(System.in);
		int reverse;
		int n;
		int i = 1;
		
		System.out.print("정수를 입력하세요.");
		n = input.nextInt();
		
		if(n < 0){
			System.out.print("ERROR!!양수 입력!!");
		}else{
		do {
			reverse = (n / i) % 10;
			i = i * 10;
			System.out.print(reverse);
		} while (i <= 1000);
	  }
	}
}
